﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Common.Helpers.Http/IHttpClientService 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       IHttpClientService
* 创建时间：  2025/5/21 18:31:50
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Common.Helpers.Http
{
    /// <summary>
    /// httpclient 接口
    /// </summary>
    public interface IHttpClientService
    {
        /// <summary>
        /// httpclient get
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="clientName"></param>
        /// <param name="url"></param>
        /// <param name="data"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        Task<ServiceResult<T>> GetAsync<T>(string clientName, string url, Dictionary<string, string> data, RequestOptions? options = null);
        /// <summary>
        /// httpclient post
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="clientName"></param>
        /// <param name="url"></param>
        /// <param name="data"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        Task<ServiceResult<T>> PostAsync<T>(string clientName, string url, Dictionary<string, string> data, RequestOptions? options = null);
    }
}
